import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2022-12-11
 * Time: 10:32
 */
////s1中拥有几个s2
//public class Test1 {
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        String s1 = scanner.nextLine();
//        String s2 = scanner.nextLine();
//        int len1 = s1.length();
//        int len2 = s2.length();
//        //计数器
//        int count = 0;
//        //确定遍历次数，len1的剩余长度大于len2的长度
//        for (int i = 0; len2 + i - 1 < len1; i++) {
//            //判断器
//            boolean matched = true;
//            //遍历整个s2
//            for (int j = 0; j < len2; j++) {
//                //有一个字符不相等，即为false
//                if (s1.charAt(j + i) != s2.charAt(j)) {
//                    matched = false;
//                    //结束循环
//                    break;
//                }
//            }
//            //记录相等的次数
//            if (matched) {
//                count++;
//            }
//        }
//
//        System.out.println(count);
//    }
//}

public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();
        int num = 0;
        String rest;
        while (s1.contains(s2)) {
            s1 = s1.substring(s1.indexOf(s2) + s2.length());
            num++;
        }
        System.out.println(num);
    }
}